#include "student.h"
#include <iostream>
#include <cstdlib>
using namespace std;

Student::Student( int studentID, const string& first, const string& last)
    :studentID(studentID), firstName(first), lastName(last)
{
	
}
Student::Student()
{
    Student(-1, "", "");
}

Schedule Student::getCurrSchedule() const
{
	return currentSched;
}
//Schedule Student::getSchedule(int timePeriod){} //Later feature
vector<Course> Student::getCompletedCourses() const
{
	return vector<Course>(); // walkaround compile error;  function is a stub
}
bool Student::isTaken(Course * queryCourse) const
{
	return false; // walkaround compile error;  function is a stub
}
bool Student::isRequired(Course * queryCourse) const
{
	return false; // walkaround compile error;  function is a stub
}
//	void Student::archiveSchedule(){} // Later Feature
void Student::addCompletedCourse()
{
	
}

/**
   Return true on success.
 */

bool Student::setFirstName( const string & name )
{

    firstName = name;
    return true;
}


/**
   Return true on success.
 */

bool Student::setLastName( const string & name )
{

    lastName = name;
    return true;
}


/**
   Return true on success.
 */

bool Student::setStudentID( const string& id )
{
    
    return setStudentID( atoi( id.c_str() )  );
}

bool Student::setStudentID( int id )
{

    studentID = id;
    return true;


}

bool Student::setPassword( const std::string& pass)
{

    passHash = pass;

    return true;

}

bool Student::setCurriculumFile( const std::string& curr )
{
	curriculumFile = curr;
	return true;

}

string Student::getCurriculumFile() const
{
	return curriculumFile;
}

std::string Student::getFirstName () const
{
    return firstName;
}

std::string Student::getLastName () const
{
	return lastName;
}

int Student::getStudentId () const
{
	return studentID;
}

bool Student::isCorrectPassword( const std::string& pass ) const
{
    //check password
    cout << "----- WARNING!-----"  << endl
	 << "isCorrectPassword INVOKED NOT DEFINED YET ALWAYS RETURNS TRUE, DO NOT USE!!!!!!" <<endl
	 << "-----/WARNING!-----"  << endl;

    return true;
}

Curriculum* Student::getCurriculum() const
{
    return pStudentCurr;
}

ostream& operator<<(ostream& output, const Student& s)
{

	return output << s.firstName << " " << s.lastName << "(" << s.studentID << ")";

}
